//
//  MPCAlertView.h
//  Pods
//
//  Created by 龙鹏飞 on 2017/9/19.
//
//

#import <UIKit/UIKit.h>

@class MPCAlertView;

typedef void(^MPBAlertViewCallBack)(NSInteger buttonIndex ,MPCAlertView *alertView);

@protocol MPCAlertViewDelegate <NSObject>

- (void)alertView:(MPCAlertView *_Nullable)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;

@end

/**
 * 提示框
 * 支持旋转
 * 支持横屏
 * 支持长文本
 * 支持多按钮
 */
@interface MPCAlertView : UIView

- (instancetype _Nullable )initWithTitle:(nullable NSString *)title message:(nullable NSString *)message delegate:(nullable id /*<MPCAlertViewDelegate>*/)delegate cancelButtonTitle:(nullable NSString *)cancelButtonTitle otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;

- (instancetype _Nullable )initWithTitle:(nullable NSString *)title
                                 message:(nullable NSString *)message
                                callBack:(MPBAlertViewCallBack _Nullable )callBack
                       cancelButtonTitle:(nullable NSString *)cancelButtonTitle
                       otherButtonTitles:(nullable NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;

@property (nonatomic, weak) id _Nullable delegate;

- (void)show;

@end
